<?php

/**
 * Home
 * 
 */

namespace Home\Controller;

class IndexController extends HomeController {

  public function index() {
    gameover('Hello world');
  }

  function php() {
    phpinfo();
  }
  
  

  function phpencode() {
    echo md5(getenv('PROCESSOR_IDENTIFIER') . getenv('PROCESSOR_REVISION'));
    echo '<br>';    
    $code = file_get_contents('./Public/tmp/a.php');
    $code = str_replace(array('<?php', '?>', '<?PHP'), array('', '', ''), $code);
    $encode = base64_encode(gzdeflate($code)); // 开始编码  
    $encode = '<?php' . "\neval(gzinflate(base64_decode(" . "'" . $encode . "'" . ")));\n?>";
    file_put_contents('./Public/tmp/b.php', $encode);
    echo 'encode finish';
  }

}
